﻿using System;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace HobSoft.SoccerBet2014.Domain.Models
{
    using Core;
    [Serializable]
    [DataContract]
    public class BmAccount : IModel
    {
        private byte _bmId;
        [Key]
        [Required]
        [DataMember(IsRequired = true)]
        public byte BmID
        {
            get { return _bmId; }
            set { _bmId = value; }
        }

        private string _account;
        [Key]
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(1)]
        public string Account
        {
            get { return _account; }
            set { _account = value; }
        }

        private string _password;
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(1)]
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        private decimal _discount;
        [DataMember]
        public decimal Discount
        {
            get { return _discount; }
            set { _discount = value; }
        }
        


        private bool _available;
        [DataMember]
        public bool Available
        {
            get { return _available; }
            set { _available = value; }
        }

        private DateTime? _lastRequestTime;
        [DataMember]
        public DateTime? LastRequestTime
        {
            get { return _lastRequestTime; }
            set { _lastRequestTime = value; }
        }

        [IgnoreDataMember]
        public Bookmaker Booker { get; set; }

    }
}
